# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py3-ntplib
_pkgname=ntplib
pkgver=0.4.0
pkgrel=3
pkgdesc="Python module that offers a simple interface to query NTP servers"
options="net" # Requires connecting to pool.ntp.org
url="https://pypi.org/project/ntplib"
arch="noarch"
license="MIT"
replaces="py-ntplib" # for backwards compatibility
provides="py-ntplib=$pkgver-r$pkgrel" # for backwards compatibility
depends="python3"
makedepends="python3-dev py3-setuptools"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/cf-natali/ntplib/archive/$pkgver.tar.gz"
builddir="$srcdir"/$_pkgname-$pkgver

build() {
	python3 setup.py build
}

check() {
	python3 -m unittest
}

package() {
	python3 setup.py install --skip-build --root="$pkgdir"
}

sha512sums="
ad735b1bccc4dc149622423b2877dc1d4b461f245dd0bd5b0cf963918ea63806772783e03eb8a66c75934746981fbd28789f19efa339c87b2f83e8218ee4a4c3  py3-ntplib-0.4.0.tar.gz
"
